# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-bs4
pkgname=('python2-bs4' 'python-bs4')
_pkgname=bs4
pkgver=0.0.2
pkgrel=1
pkgdesc='Dummy package for Beautiful Soup.'
arch=('any')
url='https://pypi.python.org/pypi/bs4/'
license=('custom:unknown')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://pypi.python.org/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/$_pkgname-$pkgver.tar.gz")
sha512sums=('838cf6d2d2904e3411f4d2db5491d7a137068381fec591330a18d3f61d3226173dcec1e036f7409af7ada5c28f7fc5fa81350e36913880503784ef724944305d')

prepare() {
  cp -a "$_pkgname-$pkgver"{,-2}
}

build() {
  cd "$_pkgname-$pkgver-2"

  python2 setup.py build

  cd "$srcdir/$_pkgname-$pkgver"
}

package_python2-bs4() {
  depends=('python2')

  cd "$_pkgname-$pkgver-2"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

package_python-bs4() {
  depends=('python')

  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

